package cn.easyshipping.cloud.business.dto;

import com.fasterxml.jackson.annotation.JsonProperty;

import javax.validation.constraints.NotBlank;

/**
 * @author: bwl
 * created on: 2020/4/20 9:39
 * description: 请求实体基类包装
 */
public class BaseRequestBody<T> {
    /**
     * 版本号
     */
    @NotBlank(message = "Version不能为空")
    private String Version;
    /**
     * 发送时间
     */
    @NotBlank(message = "PostTime不能为空")
    private String PostTime;
    /**
     * 平台代码
     */
    @NotBlank(message = "PltCode不能为空")
    private String PltCode;
    /**
     * 请求报文代码
     */
    @NotBlank(message = "ReqCode不能为空")
    private String ReqCode;
    /**
     * 请求流水号
     */
    @NotBlank(message = "SerialNo不能为空")
    private String SerialNo;
    /**
     * 用户ID
     */
    @NotBlank(message = "SerialNo不能为空")
    private String UserID;
    /**
     * 请求数据
     */
    private T PostData;

    public BaseRequestBody() {
    }

    @JsonProperty(value = "Version")
    public String getVersion() {
        return Version;
    }

    public void setVersion(String version) {
        Version = version;
    }

    @JsonProperty(value = "PostTime")
    public String getPostTime() {
        return PostTime;
    }

    public void setPostTime(String postTime) {
        PostTime = postTime;
    }

    @JsonProperty(value = "PltCode")
    public String getPltCode() {
        return PltCode;
    }

    public void setPltCode(String pltCode) {
        PltCode = pltCode;
    }

    @JsonProperty(value = "ReqCode")
    public String getReqCode() {
        return ReqCode;
    }

    public void setReqCode(String reqCode) {
        ReqCode = reqCode;
    }

    @JsonProperty(value = "SerialNo")
    public String getSerialNo() {
        return SerialNo;
    }

    public void setSerialNo(String serialNo) {
        SerialNo = serialNo;
    }

    public String getUserID() {
        return UserID;
    }

    public void setUserID(String userID) {
        UserID = userID;
    }

    @JsonProperty(value = "PostData")
    public T getPostData() {
        return PostData;
    }

    public void setPostData(T postData) {
        PostData = postData;
    }
}
